﻿@using TjZheng.Domain.DataEntity;
@{
    ViewBag.Title = "UploadCategory编辑页";
    Layout = "~/Views/Shared/_EditLayout.cshtml";
}
@inherits CMSWebViewPage<UploadCategory>
<div class="top-block">
    @CurrentButtonTool.Create()
</div>
<div>
    <form id="fr_uploadcategory" method="post">
        @*@Html.AntiForgeryToken()*@
        <table class="tblContent">
            <colgroup>
                <col class="colTitle">
                <col class="colContent" />
            </colgroup>
            <tr>
                <td><span class="txtNoNull">*</span>名称:</td>
                <td>
                    @Html.Hidden("objProvide.Id", Model.Id, false)
                    @Html.StringBox("objProvide.Name", Model.Name, true, "请输入名称", null, ValidType.Length(64))
                </td>
            </tr>
            <tr>
                <td><span class="txtNoNull">*</span>资源类型:</td>
                <td>
                    @Html.StringBox("objProvide.CategoryCode", Model.CategoryCode, true, "请输入资源类型", null, ValidType.Length(64))
                </td>
            </tr>
        </table>
    </form>
</div>
@section Bottom{
    <script type="text/javascript">
        function Save() {
            var objFormEntity = new FormEntity("#fr_uploadcategory");
            objFormEntity.url = "/uploadcategory/save/";
            objFormEntity.submiting = function () {
                return $(objFormEntity.selector).form('validate');
            };
            objFormEntity.submitSuccess = function (InvokeResult) {
                if (InvokeResult.ResultCode == "Success") {
                    ShowMessage(InvokeResult.ResultMessage);
                    Back();
                } else {
                    ShowMessage(InvokeResult.ResultMessage);
                }
            };
            objFormEntity.isClearData = false;
            objFormEntity.submit();
        }
        function Back() {
            window.location.href = "/uploadcategory";
        }
    </script>
}
